{template '_header'}
<link rel="stylesheet" href="../addons/ewei_shopv2/plugin/sns/template/mobile/default/images/common.css"/>
<div class='fui-page fui-page-current  fui-page-current sns-board-page'>
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back"></a>
        </div>
        <div class="title">{if $openid==$_W['openid']}我的{else}TA的{/if}话题</div>
        <div class="fui-header-right btn-edit">&nbsp;</div>
    </div>
    <div class="fui-content">
         <div class="fui-list-group" id="user-posts-list" style="margin-top:0"></div>
        <div class="empty" style="display:none;"><i class="icon icon-cascades" style="font-size:4rem;color:#ccc;"></i> <br/>暂时没有任何话题</div>
        <div class='infinite-loading'><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
    </div>


    <script language='javascript'>
        require(['../addons/ewei_shopv2/plugin/sns/static/js/user_posts.js'], function (modal) {
            modal.init({ id: "{$member['id']}"});
        });
    </script>

</div>

<script type="text/html" id="tpl_user_posts_list">
    <%each list as row%>
    <div class="fui-card fui-card-list fui-card-full post-card" >

        <a class='fui-card-info'  data-nocache='true' href='{php echo mobileUrl('sns/post')}&id=<%row.id%>'>
        <div class='image'>
            <img data-lazy='<%row.avatar%>'  />
        </div>
        <div class="text">
            <span class="title"><%row.nickname%></span>
            <span class="subtitle"><%row.createtime%></span>
        </div>
        </a>

        <a class="fui-card-content"  data-nocache='true' href="{php echo mobileUrl('sns/post')}&id=<%row.id%>">
            <%if row.title%><b class="fui-card-content-title">
            <%if row.isbest==1 || row.isboardbest==1%><span class="fui-label fui-label-warning">精</span><%/if%>
            <%row.title%>
        </b><%/if%>
            <%=row.content%>
        </a>
        <%if row.images.length>0%>
        <a class="fui-card-images"  data-nocache='true' href="{php echo mobileUrl('sns/post')}&id=<%row.id%>">
            <%if row.imagecount>row.images.length%>
            <div class="num"><i class="icon icon-pic"></i> <%=row.imagecount%></div>
            <%/if%>
            <%each row.images as img%>
            <img style="background-image:url('<%img%>');width:<%row.imagewidth%>" />
            <%/each%>
        </a>
        <%/if%>

        <div class='fui-card-btns'>
            <a href='javascript:;'><i class="icon icon-comment"></i> (<%row.postcount%>)</a>
            <a href='javascript:;' class="like-good" data-isgood="1"  data-pid="<%row.id%>"><i class="icon icon-good"></i> (<span><%row.goodcount%></span>)</a>


        </div>
    </div>
    <%/each%>

</script>
</div>


{template '_footer'}
